{%extends file="home/page/assetslayout.tpl"%}

{%block name="assets_head_static"%}
    {%require name="home:static/assetsiphone6/assetsiphone6.less"%}
    {%require name="home:static/assetsiphone6/assetsiphone6.js"%}
    <script>
        P.data('summary',{%json_encode($summary)%});
    </script>
{%/block%}

{%block name="type_assets"%}
<div class="page-assetsiphone6">
    <ul class="nav">
        <li><a href="/user/assetsdemand" class="demand-logo ">真融宝活期</a></li>
        <li><a href="/user/assetsterm" class="term-logo">真融宝定期</a></li>
        <li><a href="/user/assetsiphone6" class="iphone6-logo active">我的果6宝</a></li>
    </ul>
    <div class="assets-detail">
        <div class="block construct">
            <div class="assets-cycle"></div>
            <div class="right">
                <div class="line">

                    <div class="money-block ">
                        <i class="ob-icon bo-icon-cycle2"></i>
                        <div class="ob-context">
                            <div class="ob-title ob-title1">￥{%$summary.activity_amount|format_amount%}</div>
                            <div class="ob-info">产品总额</div>
                        </div>
                    </div>

                    <div class="money-block ">
                        <i class="ob-icon bo-icon-cycle2"></i>
                        <div class="ob-context">
                            <div class="ob-title ob-title1">￥{%$summary.credit|format_amount%}</div>
                            <div class="ob-info">
                                <span>已支付</span>
                                {%*
                                    {%if $summary.credit>0%}
                                        <a href="/user/myassemble?pid=4" style="margin-left: 10px;">我的债权组合</a>
                                    {%/if%}
                                *%}
                            </div>
                        </div>
                    </div>
                </div>

                <div class="line">
                    <div class="money-block">
                        <i class="ob-icon bo-icon-cycle2"></i>
                        <div class="ob-context">
                            <div class="ob-title ob-title1">￥{%$summary.total_profit|format_amount%}</div>
                            <div class="ob-info">预期收益</div>
                        </div>
                    </div>
                    <div class="money-block bankcard-container">
                        <i class="ob-icon bo-icon-cycle2"></i>
                        <div class="ob-context">

                            <div class="ob-title ob-title1">{%if $summary.bank_number%}{%$summary.bank_number|ed_substr%}{%/if%}</div>
                            {%if $summary.bank_number%}
                                <div class="ob-info">已绑定的银行卡，<a class="btn-modifybank">修改</a></div>
                            {%elseif $summary.activity_type%}
                                <div class="ob-info">已绑定的银行卡，<a class="btn-addbank">添加</a></div>
                            {%else%}
                                <div class="ob-info">已绑定的银行卡</div>
                            {%/if%}
                            <div style="margin-left:7px;">系统会自动提现到绑定的银行卡</div>

                            <div class="bank-list">
                                您还没有添加银行卡，<a href="/user/withdraw">去添加</a>
                            </div>

                        </div>
                    </div>
                </div>
                <div style="padding:20px; 0 0 50px;">
                    <a class="btn btn-large btn-main" href="/iActivity/recharge">购买</a>
                    <a class="btn btn-large btn-recharge-tip">提现</a>
                </div>
            </div>
        </div>
        {%if $list && $list|count%}
            <div style="height: 20px;"></div>
            <div class="block profit-list">
                <div class="list-table">
                    <table>
                        <thead>
                        <tr>
                            <td>时间</td>
                            <td>我的预期收益</td>
                            <td>已返还收益</td>
                            <td>已返还本金</td>
                            <td>状态</td>
                        </tr>
                        </thead>
                        <tbody>
                        {%foreach $list as $item%}
                        <tr>
                            <td>{%$item.snap_date%}</td>
                            <td>￥{%$item.expect_profit%}</td>
                            <td>￥{%$item.return_profit%}</td>
                            <td>￥{%$item.return_amount%}</td>
                            <td>
                                {%if $item.status==1%}
                                    未提现
                                {%elseif $item.status==2%}
                                    提现中
                                {%elseif $item.status==3%}
                                    已提现
                                {%else%}
                                    未到提现时间
                                {%/if%}
                            </td>
                        </tr>
                        {%/foreach%}
                        </tbody>
                    </table>
                </div>
            </div>
        {%/if%}
    </div>
</div>
{%/block%}